package com.bawei.caohao0802.model.util

import com.bawei.caohao0802.model.bean.DengBean
import com.bawei.caohao0802.model.bean.KaiBean
import com.bawei.caohao0802.model.bean.LeiBean
import com.bawei.caohao0802.model.bean.ZbBean
import io.reactivex.Observable
import okhttp3.MultipartBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Query

/**
 * 作者: 曹浩
 * 时间: 2024/8/2
 * 功能描述:
 */
interface ApiServer {
    @Multipart
    @POST("live-platform/verify/openLive")
    fun getzhibo(
        @Header("userId") userId: String,
        @Header("sessionId") sessionId: String,
        @Query("liveType") liveType: Int,
        @Query("liveTitle") liveTitle: String,
        @Query("longitude") longitude: String,
        @Query("latitude") latitude: String,
        @Part multipartBody: MultipartBody.Part
    ): Observable<KaiBean>

    @POST("live-user/v1/login")
    fun getdeng(@Body map: Map<String, String>): Observable<DengBean>

    @GET("live-platform/findLiveList")
    fun getlei(
        @Header("userId") userId: Int,
        @Query("liveType") liveType: Int,
        @Query("page") page: Int,
        @Query("size") size: Int
    ): Observable<LeiBean>
    @GET("live-platform/watchLive")
    fun getzb(
        @Header("userId") userId: String,
        @Header("sessionId") sessionId: String,
        @Query("liveId") liveId: Int,
    ): Observable<ZbBean>
    @Multipart
    @POST("live-platform/verify/openLive")
    fun getkai(
        @Header("userId") userId: String,
        @Header("sessionId") sessionId: String,
        @Query("liveType") liveId: Int,
        @Query("liveTitle") liveTitle: String,
        @Query("longitude") longitude: String,
        @Query("latitude") latitude: String,
        @Part multipartBody: MultipartBody.Part,
    ): Observable<KaiBean>









}